package FrameWork.EventBus;

public interface Emitter {

    default void emit(String name, IEvent event){
        EventBusManager.submit(getDispatcherCode(),name,event);
    }

    default void emit(int code,String name,IEvent event){
        EventBusManager.submit(code,name,event);
    }

    default void syncEmit(String name, IEvent event){
        EventBusManager.syncSubmit(name,event);
    }

    default int getDispatcherCode(){
        return this.hashCode();
    }
}
